{include file="public/header" /}
<script src="/static/ueditor/ueditor.config.js"></script>
<script src="/static/ueditor/ueditor.all.min.js"></script>
<script src="/static/ueditor/lang/zh-cn/zh-cn.js"></script>
<style>


</style>
<body>
<div class="x-body ">
    <form  class="layui-form">
        <div class="layui-form-item">
            <label for="employee_code" class="layui-form-label">员工编号</label>
            <div class="layui-input-inline">
                <input type="text" id="employee_code" value="{$employeeCode}" disabled="disabled" name="employee_code" lay-verify="required" autocomplete="off" class="layui-input" >
            </div>
            <span style="color: red">*</span>
        </div>

        <div class="layui-form-item">
            <label for="employee_name" class="layui-form-label">员工姓名</label>
            <div class="layui-input-inline">
                <input type="text" id="employee_name" name="employee_name" lay-verify="required" autocomplete="off" class="layui-input" >
            </div>
            <span style="color: red">*</span>
        </div>
        <div class="layui-form-item">
            <label for="password" class="layui-form-label">登陆密码</label>
            <div class="layui-input-inline">
                <input type="text" id="password"  name="password" lay-verify="required" autocomplete="off" class="layui-input" >
            </div>
            <span style="color: red">*</span>
        </div>
        <div class="layui-form-item">
            <label for="tle" class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
                <input type="text" id="tle"  name="tle"  autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门名称</label>
            <div class="layui-input-block">
                <select name="department_name" >
                    <option value=""></option>
                    {volist name="departmentInfo" id = "info"}
                     <option value="{$info.id}">{$info.department_name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">职务名称</label>
            <div class="layui-input-block">
                <select name="duties_name" >
                    <option value=""></option>
                    {volist name="dutiesInfo" id = "info"}
                    <option value="{$info.id}">{$info.duties_name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <!--<div class="layui-form-item">-->
            <!--<label for="process_id" class="layui-form-label">班次</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" id="process_id1" disabled="disabled" name="" lay-verify="required" autocomplete="off" class="layui-input" >-->
                <!--<p id="pLog" style="color:red"></p>-->
            <!--</div>-->
        <!--</div>-->
        <div class="layui-form-item">
            <label for="id_card_no" class="layui-form-label">身份证号码</label>
            <div class="layui-input-inline">
                <input type="text" id="id_card_no"  name="id_card_no" autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label for="factory_date" class="layui-form-label">进厂日期</label>
            <div class="layui-inline"> <!-- 注意：这一层元素并不是必须的 -->
                <input type="text" name="factory_date" class="layui-input" id="data">
            </div>
            <script>
                layui.use('laydate', function(){
                    var laydate = layui.laydate;

                    //执行一个laydate实例
                    laydate.render({
                        elem: '#data' //指定元素
                    });
                });
            </script>
        </div>
        <div class="layui-form-item">
            <label for="process_id" class="layui-form-label">离职日期</label>
            <div class="layui-inline"> <!-- 注意：这一层元素并不是必须的 -->
                <input type="text" name="leave_date" class="layui-input" id="data1">
            </div>
            <script>
                layui.use('laydate', function(){
                    var laydate = layui.laydate;

                    //执行一个laydate实例
                    laydate.render({
                        elem: '#data1' //指定元素
                    });
                });
            </script>
        </div>
        <div class="layui-form-item">
            <label for="bank_card" class="layui-form-label">银行卡号</label>
            <div class="layui-input-inline">
                <input type="text" id="bank_card" name="bank_card"autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label for="owner" class="layui-form-label">业主</label>
            <div class="layui-input-inline">
                <input type="text" id="owner"  name="owner"  autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label for="opening_bank" class="layui-form-label">开户行</label>
            <div class="layui-input-inline">
                <input type="text" id="opening_bank" name="opening_bank"  autocomplete="off" class="layui-input" >
                <p id="pLog" style="color:red"></p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否离职</label>
            <div class="layui-input-block">
                <input type="checkbox"  name="is_leftis" lay-skin="switch" lay-filter="switchTest" lay-text="是|否">
                <div class="layui-unselect layui-form-switch layui-form-onswitch" lay-skin="_switch"><em>ON</em><i></i></div>
            </div>
        </div>
        <div class="layui-form-item" lay-filter="sex">
            <label class="layui-form-label">定额权限</label>
            <div class="layui-input-block">
                <input type="radio" name="is_quota" value="0" title="查看" checked=""><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>查看</div></div>
                <input type="radio" name="is_quota" value="1" title="修改" ><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring"></i><div>修改</div></div>
            </div>
        </div>
        <div class="layui-form-item" lay-filter="sex">
            <label class="layui-form-label">价格权限</label>
            <div class="layui-input-block">
                <input type="radio" name="is_price" value="0" title="隐藏"  checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring"></i><div>隐藏</div></div>
                <input type="radio" name="is_price" value="1" title="查看" ><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>查看</div></div>
                <input type="radio" name="is_price" value="2" title="修改"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>修改</div></div>
            </div>
        </div>
        <div class="layui-form-item" lay-filter="sex">
            <label class="layui-form-label">报价权限</label>
            <div class="layui-input-block">
                <input type="radio" name="is_offer" value="0" title="隐藏"  checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring"></i><div>隐藏</div></div>
                <input type="radio" name="is_offer" value="1" title="查看" ><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>查看</div></div>
                <input type="radio" name="is_offer" value="2" title="修改"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><div>修改</div></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-inline">
                <input type="text" id="annotation" name="annotation" autocomplete="off" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-submit lay-filter="addId">
                增加
            </button>
        </div>
    </form>
</div>
<script>
    layui.use(['form'], function(){
        $ = layui.jquery;
        var form = layui.form,layer = layui.layer;

        //监听提交
        form.on('submit(addId)', function(data){
            //console.log(data);
            $.post("{:url('index/Employee/employeeAdd')}",data.field,function(info){
                if (info) {
                    layer.alert("添加成功", {icon: 6},function () {
                        window.parent.location.reload();  //刷新父级页面
                        // 获得frame索引
                        var index = parent.layer.getFrameIndex(window.name);
                        //关闭当前弹出层
                        parent.layer.close(index);
                    });
                }else{
                    layer.alert("添加失败", {icon: 5});
                }
            },'json');
            return false;
        });
    });
</script>
</body>

</html>